/* Quiz Styles */
.question-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.question-text {
    font-size: 1.5rem;
    color: #333;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.quiz-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.options-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.option-button {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.option-button:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.option-button.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.option-button.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.question-footer {
    border-top: 2px solid #f0f0f0;
    padding-top: 1.5rem;
    margin-top: 1rem;
}

/* Updated explanation styles to fit within question container */
.explanation {
    grid-row: 2;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 1.2rem;
    margin: 0;
    color: #495057;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #28a745;
    position: relative;
    animation: slideIn 0.3s ease-out;
    opacity: 0;
    transform: translateY(20px);
}

.explanation.show {
    opacity: 1;
    transform: translateY(0);
}

.option-button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.explanation {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 1.2rem;
    margin: 1.5rem auto;
    color: #495057;
    font-size: 1rem;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #28a745;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.explanation::before {
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Different colors for different outcomes */
.explanation.correct {
    border-left-color: #28a745;
}


.explanation.incorrect {
    border-left-color: #dc3545;
}

.explanation.incorrect::before {
    content: "💡";
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .explanation {
        padding: 1rem;
        margin: 1rem auto;
        font-size: 0.9rem;
    }
}

.quiz-results {
    text-align: center;
    padding: 2rem;
}

.quiz-results h3 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.quiz-results p {
    color: #666;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.quiz-message {
    font-weight: bold;
    color: #28a745;
}

#quiz-score {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin: 1rem 0;
}

#quiz-message {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.1rem;
}

#quiz-message.success {
    color: #28a745;
}

#quiz-message.error {
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .question-container {
        padding: 1rem;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .option-button {
        font-size: 1rem;
        padding: 0.75rem;
    }
}